package de.scs.ui;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Image;

import javax.swing.ImageIcon;

public class Utils
{
  public static ImageIcon scaleImage(ImageIcon img, int w, int h)
  {
    img.setImage(img.getImage().getScaledInstance(w, h, Image.SCALE_DEFAULT));
    return img;
  }

  public static Color setHSBColor(int h, int s, int b)
  {
    return Color.getHSBColor((float) h / 360, (float) s / 100, (float) b / 100);
  }

  public static Component defineFont(Component c)
  {
    c.setFont(new Font("Serif", Font.ITALIC, 16));
    return c;
  }
}
